
<style>

  *{
    margin: 0;
    padding: 0;
  }
  li{
    list-style: none;
    margin-bottom: 10px;
  }
  .search{

    width: 400px;
    margin: 20px auto;
  }

  .search input{

    margin-bottom: 20px;

    width: 280px;
    height: 26px;
    margin-right: 10px;
  }

  .search button{
    height: 32px;
    width: 80px;
  }

  .title{
    background: #cccccc;
    line-height: 36px;
    text-align: center;
  }
  .input-box{
    background: #ededed;
    padding: 15px 10px;
  }
  .list-box{
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    padding: 15px;
  }
  .remove-btn{
    margin-left: 240px;
  }
</style>

<div class="search">
  <div class="title">Angular TodoList</div>
  <div class="input-box">
    <input type="text" [(ngModel)]="keyword" placeholder="add to do"/>
    <button (click)="doSearch()">添加</button>
  </div>
  <ul class="list-box">
    <li *ngFor="let item of historyList;let key=index;">
      {{item}}
      <button (click)="deleteHistory(key)" class="remove-btn">删除</button>
    </li>
  </ul>
</div>

<router-outlet></router-outlet>
